package component {
  import flash.display.Bitmap;
  import flash.display.Loader;
  import flash.events.Event;
  
  import mx.controls.Image;
  import mx.core.mx_internal;
  
  use namespace mx_internal;
  
  public class ExImage extends Image {
    /**
     * デフォルトコンストラクタ
     */
    public function ExImage():void {
      super();
    }
    
    /**
     * ロード完了イベント
     *      smoothingを有効に設定
     */
    override mx_internal function contentLoaderInfo_completeEventHandler(event:Event):void {
      var smoothLoader:Loader = event.target.loader as Loader;
      var smoothImage:Bitmap = smoothLoader.content as Bitmap;
      smoothImage.smoothing = true;
      
      dispatchEvent(new Event(Event.COMPLETE));
      super.contentLoaderInfo_completeEventHandler(event);
    }
  }
}
